home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / copy.h < prev    next >
C/C++ Source or Header  |  1992-10-06  |  1KB  |  50 lines

  1. /* interface for copier */
  2.  
  3. int current_space(void);
  4.  
  5. LispObject allocate_nbytes(LispObject *,int size,int type);
  6. LispObject allocate_cbytes(LispObject *,int size,int number,int type);
  7.  
  8. int add_root(LispObject *);
  9.  
  10. #define S_G_V(x) SYSTEM_GLOBAL_VALUE(x)
  11.  
  12.  
  13. /* INTERNAL DEFINITIONS */
  14. #define PAGE_SIZE (64*1024)
  15. SYSTEM_GLOBAL(SystemSemaphore,GC_sem);
  16.  
  17. #ifdef NODEBUG
  18. #define COPY_BUG(x) 
  19. #else
  20. #define COPY_BUG(x) x
  21. #endif
  22.  
  23. typedef struct page_list_struct
  24. {
  25.   struct page_list_struct *next;
  26.   int status;
  27.   char *end;
  28.   int id;
  29.   char start[sizeof(int)];
  30. } *PageList , PageEnt;
  31.  
  32. #define PAGE_FREE 0
  33. #define PAGE_USED(space) 1+(space)
  34.  
  35. #define RIG_GC_THREAD(stacktop) \
  36. { \
  37.   \
  38.   (void) system_thread_rig(stacktop,(GC_thread)); \
  39.     { LispObject* newstack; \
  40. \
  41.       newstack = load_thread(GC_thread); \
  42.       COPY_BUG(fprintf(stderr,"{GC_THREAD: %x}",newstack)); \
  43.       if (set_continue(stacktop,GC_thread->THREAD.state)) \
  44.     { \
  45.        void first_gc_mark_call(LispObject *); \
  46.        first_gc_mark_call(stacktop); \
  47.     }     \
  48.     } \
  49. }
  50.